package com.hrpmar.mapper;

import com.hrpmar.controller.dto.DrugstorageDto;
import com.hrpmar.controller.dto.OutstorageDto;
import com.hrpmar.pojo.Outstorage;
import com.hrpmar.pojo.Purplan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by c on 2017-11-15.
 */
public interface OutstorageMapper {

    /**
     * 分页条件查询出库主表
     * @param offset
     * @param limit
     * @param condition
     * @return
     */
    public List<Purplan> search(@Param("offset") Integer offset, @Param("limit") Integer limit, @Param("condition") OutstorageDto condition);

    /**
     * 获取信息总条数
     * @param condition
     * @return
     */
    public Integer getTotal(@Param("condition") OutstorageDto condition);

    /**
     * 根据出库编号获取出库主表信息
     * @param osNum
     * @return
     */
    public Outstorage searOutstorageByNum(String osNum);

    /**
     * 获取最后一个出库单号
     * @return
     */
    public String getLastOutNum();

    /**
     * 添加出库主表信息
     * @param outstorage
     * @return
     */
    public int addOutsto(Outstorage outstorage);

}
